package com.qf.service.impl;

import com.qf.common.dto.LogisticsDto;
import com.qf.mapper.LogisticsMapper;
import com.qf.service.LogisticsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author KING
 * @ClassName: com.qf.service.impl.LogisticsServiceImpl
 * @Description: 该类的功能描述
 * @date: 2021/10/30 9:44
 */
@Service
public class LogisticsServiceImpl implements LogisticsService {
    @Resource
    private LogisticsMapper logisticsMapper;

    @Override
    @Transactional(rollbackFor = RuntimeException.class)
    public Boolean addBatch(List<LogisticsDto> logisticsVoList) {
        Integer batch = logisticsMapper.insertBatch(logisticsVoList);
        return batch == logisticsVoList.size();
    }
}

